package com.ruoyi.tws.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.tws.api.domain.Driver;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "RemoteDriverClient", value = ServiceNameConstants.TWS_SERVICE)
public interface RemoteDriverClient {

    /**
     * 根据手机号查询司机
     */
    @PostMapping(value = "/driver/client/getDriverByPhone")
    Driver getDriverByPhone(@RequestParam("phone") String phone);

    /**
     * 司机注册
     */
    @PostMapping(value = "/driver/client/regist")
    boolean regist(@RequestBody Driver driver);

}
